import java.io.IOException;

public class Main 
 {
  public static void main(String[] args) throws IOException 
   {
    int numPortRecepteurProcess1 = 8082;
    int numPortRecepteurProcess2 = 8083;

    Process process1 = new Process (1, numPortRecepteurProcess1, numPortRecepteurProcess2);
    Process process2 = new Process (2, numPortRecepteurProcess2, numPortRecepteurProcess1);

    process1.lanceClient();
    process2.lanceClient();

    process1.lanceReception();
    process2.lanceReception();

    process1.lanceEmission();
    process2.lanceEmission();

    process1.lancePere();
    process2.lancePere();

    MessageUtile messageUtile = new MessageUtile ("REP", 1, 1);
    process1.getPere().envoiMessage(messageUtile);
   }
 }
